new Vue({
    el: '#container',
    data() {
        return {
            username: '',
            password: '',
            loading: false
        }
    },
    methods: {
        logincheck() {
            var self = this;
            if (self.username && self.password) {
                $.ajax({
                    type: 'post',
                    url: '/webadmin/auth/authlogin',
                    data: { username: self.username, password: self.password },
                    dataType: 'json',
                    success: function (ret) {
                        self.$message({
                            showClose: true,
                            message: ret.msg,
                            type: ret.type
                        })

                        if (ret.code == 200) {
                            setTimeout(function () { window.location.href = "/webadmin/index/index"; }, 1500)
                        }
                    }
                })
            }
        }
    }
})